home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-15 | 4.5 KB | 157 lines | [TEXT/CWIE] |
- /*
- ictbSample.r
-
- Use of ictb snippet
- Albert Hui -- MacDTS
-
- This snippet shows the an example of ictb resource this is discussed in
- Inside Macintosh:Macintosh Toolbox Essentials, page 6-158 t0 6-164.
- It is based on the Dialog Manager Q&A technote and modified from ictb sample
- from Ramon Silva. You can find the technote
- in the latest developer CD:
-
- Dev.CD Jun 96 RL
- Technical Documentation
- Macintosh Technical Notes
- Archive
- Toolbox
- tb_525.html.
-
- There is no Rez template for it, and no ResEdit template or editor. This sample
- ictbSample.r shows how you can do one by hand.
-
- The best solution is to get Resorcerer which provides an excellent ictb editor.
- With Resorcerer, it is really simple to use ictb in your dialog boxes.
-
- This sample is built with CW 9.
- */
-
- #include "Types.r"
-
-
-
- /* dlog stuff */
- resource 'DLOG' (128) {
- {80, 74, 290, 464},
- dBoxProc,
- visible,
- goAway,
- 0x0,
- 128,
- ""
- };
-
- resource 'DITL' (128) {
- { /* array DITLarray: 8 elements */
- /* [1] */
- {185, 305, 205, 363},
- Button {
- enabled,
- "Done"
- },
- /* [2] */
- {46, 290, 64, 369},
- CheckBox {
- enabled,
- "Memory"
- },
- /* [3] */
- {97, 290, 115, 369},
- CheckBox {
- enabled,
- "Memory"
- },
- /* [4] */
- {148, 290, 166, 369},
- CheckBox {
- enabled,
- "Memory"
- },
- /* [5] */
- {41, 12, 70, 275},
- EditText {
- enabled,
- ""
- },
- /* [6] */
- {92, 12, 121, 275},
- EditText {
- enabled,
- ""
- },
- /* [7] */
- {143, 12, 172, 275},
- EditText {
- enabled,
- ""
- },
- /* [8] */
- {5, 6, 21, 269},
- StaticText {
- disabled,
- "Type into them to see whats up"
- }
- }
- };
-
- resource 'dctb' (128) {
- { /* array ColorSpec: 5 elements */
- /* [1] */
- wContentColor, 65535, 65535, 52428,
- /* [2] */
- wFrameColor, 0, 0, 0,
- /* [3] */
- wTextColor, 0, 0, 0,
- /* [4] */
- wHiliteColor, 0, 0, 0,
- /* [5] */
- wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- data 'ictb' (128) {
- $"0020 0020" /*$00 the button */
- $"0000 0000" /*$04 Check box 1 */
- $"0000 0000" /*$08 Check box 2 */
- $"0000 0000" /*$0C Check box 3 */
- $"0000 0000" /*$10 Edit Text 1 */
- $"000D 0040" /*$14 Edit Text 2 just change the family, */
- /* size, and text color */
- $"8005 0054" /*$18 Edit Text 3 change family and size, */
- /* using font name */
- $"8005 0068" /*$1C Stat Text 1 */
- /* Start of the ictb items here */
- /* Color table for the done button */
- $"0000 0000" /*$20 ccSeed */
- $"0000 0002" /* Reserved / size of color table */
- $"0000 0000 0000 FFFF" /* cFrameColor, 65535,65535,52428 */
- $"0001 FFFF FFFF CCCC" /* cBodyColor, 0, 0, 0 */
- $"0002 0000 0000 FFFF" /* cTextColor, 0, 0, 65535 */
- /* Edit Text item 5 text/color info... */
- $"0001" /*$40 diFont application font */
- $"0000" /*$42 diStyle plain */
- $"000A" /*$44 diSize whatever... */
- $"FFFF 8000 0000" /*$46 forecolor */
- $"FFFF FFFF CCCC" /*$4C backColor */
- $"0000" /*$52 diMode */
- /* Edit Text item 6 text/color info... */
- $"008C" /*$54 diFont application font */
- $"0000" /*$56 diStyle outline */
- $"000C" /*$58 diSize whatever... */
- $"0000 0000 0000" /*$5A forecolor */
- $"FFFF FFFF CCCC" /*$60 backColor */
- $"0000" /*$66 diMode */
- /* Edit static text item 8 /color info... */
- $"007C" /*$68 diFont application font */
- $"0000" /*$6A diStyle plain */
- $"000C" /*$6C diSize whatever... */
- $"0000 0000 0000" /*$6E forecolor */
- $"FFFF FFFF CCCC" /*$74 backColor */
- $"0000" /*$7A diMode */
- /* Start of the font name table here */
- $"0743 6F75 7269 6572" /*$7C font name Courier */
- $"0647 656E 6576 6100" /*$84 font name Geneva */
- $"0850 616C 6174 696E" /*$8C font name Palatino */
- $"6F00"
- };
-